import request from '@/utils/request.js'
import Cookie from '@/utils/Cookie.js'

function getOnLinePeopleNum() {
  return request.instance.get("/system/onLineNum", {
    headers: {
      'token': Cookie.getCookie('token')
    }
  });
}

function getGroupNum() {
  return request.instance.get("/group/num", {
    headers: {
      'token': Cookie.getCookie('token')
    }
  });
}

function getChatroomNum() {
  return request.instance.get("/chatroom/num", {
    headers: {
      'token': Cookie.getCookie('token')
    }
  });
}

function getVMMaximumMemory() {
  return request.instance.get("/system/vmMaxMemory", {
    headers: {
      'token': Cookie.getCookie('token')
    }
  });
}

function getVMMemoryUsed() {
  return request.instance.get("/system/vmMemoryUsed", {
    headers: {
      'token': Cookie.getCookie('token')
    }
  });
}

function getPHMaximumMemory() {
  return request.instance.get("/system/phMaxMemory", {
    headers: {
      'token': Cookie.getCookie('token')
    }
  });
}

function getPHMemoryUsed() {
  return request.instance.get("/system/phMemoryUsed", {
    headers: {
      'token': Cookie.getCookie('token')
    }
  });
}

function getDisk() {
  return request.instance.get("/system/disk", {
    headers: {
      'token': Cookie.getCookie('token')
    }
  });
}

export default {
  getOnLinePeopleNum, getGroupNum, getChatroomNum,
  getVMMaximumMemory, getVMMemoryUsed,
  getPHMaximumMemory, getPHMemoryUsed,
  getDisk
};
